﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Hartley.ApplicationLogic;
using Hartley.DTOs;

namespace WebApplication1
{
    public partial class viewSportsCategorizewise : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindGridview();
            }
        }

        private void BindGridview()
        {
            string[] sportsLinkNames = { "View all of the College Sports Data in Year wise",
                                            "View all of the College Sports Data in Game type wise",
                                             "View all of the College Sports Data in  Age division wise" };
            string[] sportsLinkNavigationUrls = { "~/viewTeamsByYr.aspx",
                                                  "~/viewTeamsByGameType.aspx",
                                                  "~/viewTeamsByAgeDivision.aspx"};
            DataTable dt = new DataTable();
            dt.Columns.Add("LinkName");
            dt.Columns.Add("NavigationUrl");
            for (int i = 0; i < sportsLinkNames.Count(); i++)
            {
                dt.Rows.Add();
                dt.Rows[i]["LinkName"] = sportsLinkNames[i].ToString();
            }

            for (int i = 0; i < sportsLinkNavigationUrls.Count(); i++)
            {
                dt.Rows.Add();
                dt.Rows[i]["NavigationUrl"] = sportsLinkNavigationUrls[i].ToString();
            }

            gvViewSportsCategories.DataSource = dt;
            gvViewSportsCategories.DataBind();
        }
    }
}